package markor.jpa.hello.jpa.bean;

import lombok.Data;

import java.io.Serializable;

@Data
public class ResponseDTO<T> implements Serializable{

    private String code;
    private String msg;
    private T data;
    private long ctime;

    public ResponseDTO() {
        ctime = System.currentTimeMillis();
    }

    public String getCode() {
        return code;
    }

    public ResponseDTO<T> setCode(String code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public ResponseDTO<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Long getCtime() {
        return ctime;
    }

    public ResponseDTO<T> setCtime(Long ctime) {
        this.ctime = ctime;
        return this;
    }

    public T getData() {
        return data;
    }

    public ResponseDTO<T> setData(T data) {
        this.data = data;
        return this;
    }
}
